const fs = require('fs');

function readFilePromise(path) {
    return new Promise((resolve, reject) => {
        fs.readFile(path, 'utf-8', (error, data) => {
            if (error) reject(error);
            resolve(data);
        });
    });
}

(async function () {
    const res = await readFilePromise('./app.js');
    console.log(res);

    const res1 = await readFilePromise('./package.json');
    console.log(res1);

    const res2 = await readFilePromise('./user.js');
    console.log(res2);
})();
